<template>
	<a-empty style="min-height: 200px; padding-top: 60px; padding-bottom: 60px">
		<template #image>
			<div class="empty-image">
				<!-- <a-image :src="EmptyImage" :height="height" /> -->
			</div>
		</template>
		<div>
			<p>{{ text }}</p>
			<a-button style="margin-top: 20px" v-if="showBack" type="primary">{{ backText }}</a-button>
		</div>
	</a-empty>
</template>

<script setup lang="ts">
import EmptyImage from "@/assets/images/landing.svg"

interface PropsType {
	text: string
	showBack?: boolean
	backText?: string
	height?: number | string
}
const props = withDefaults(defineProps<PropsType>(), {
	text: "空空如也",
	showBack: false,
	backText: "返回首页",
	height: 200,
})
</script>

<style lang="less" scoped>
.empty-image {
	margin: 0 auto;
}
</style>

